<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script type="application/javascript" src="../node_modules/jquery/dist/jquery.js" ></script>

    <script type="text/javascript">
        // $(document).ready(function(){
        //     $("#b01").click(function(){
        //         htmlobj=$.ajax({url:"http://127.0.0.1:8080/getAllStudent",async:false});
        //         $("#myDiv").html(htmlobj.responseText);
        //     });
        // });

        $(document).ready(function(){
            $("button").click(function(){
                $.get("http://192.168.1.86:8080/getAllStudent",function(data,status){
                    alert("数据：" + data + "\n状态：" + status);
                });
            });
        });

    </script>
</head>
<body>

<div id="myDiv"><h2>通过 AJAX 改变文本</h2></div>
<button id="b01" type="button">改变内容</button>


</body>
</html>